/**
 * Project Name:FileServiceAPI
 * File Name:FileServiceAPI.java
 * Package Name:com.bwda.dsrs.businessservice.api;
 * Date:2019年4月28日
 * Copyright (c) 2019, 江苏保旺达软件有限公司 All Rights Reserved.
 */
package com.bwda.dsrs.filecenter.api;

import com.bwda.dsrs.filecenter.api.clientappversion.file.FileWatermarkTemplate;
import com.bwda.dsrs.filecenter.api.clientappversion.file.service.FileServerTemplate;
import com.bwda.dsrs.filecenter.config.FeginInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * fileService访问接口
 *
 * @author youzhen
 * @date 2019 /4/19
 */
@FeignClient(name = "fileService", configuration = FeginInterceptor.class)
public interface FileServiceApi4A {


    /**
     * fileService访问 FTP下载
     *
     * @param fileServerTemplate file server template
     */
    @PostMapping(value = "/getFtpFileServer")
    void getFtpFileServer(@RequestBody FileServerTemplate fileServerTemplate);

    /**
     * fileService访问
     * FTP下载
     *
     * @param fileWatermarkTemplate file watermark template
     * @return the byte [ ]
     * @author youzhen
     */
    @PostMapping(value = "/getPreviewImg")
    byte[] getPreviewImg(@RequestBody FileWatermarkTemplate fileWatermarkTemplate);

    /**
     * fileService访问
     * 本地下载
     *
     * @param fileServerTemplate file server template
     * @author youzhen
     */
    @RequestMapping(value = "/getFtpFileServer", method = RequestMethod.POST)
    void getFileServer(@RequestBody FileServerTemplate fileServerTemplate);


}
